#ifndef CTimerHandler_HPP
#define CTimerHandler_HPP

#include <Arduino.h>

class CTimerHandler
{
public:
   CTimerHandler(unsigned long delay);
   
   /**
    *
    */
   void start();
   
   /**
    *
    */
   void stop();
   
   inline boolean isEnabled() const;
   
   /**
    * Returns enum value that represents event: timer fired/timer not fired (eTimerEvent value)
    */
   uint8_t processTimer();
private:
   unsigned long        mDelay;
   unsigned long        mLastTime;
   bool                 mEnabled;
};

boolean CTimerHandler::isEnabled() const
{
   return mEnabled;
}
#endif //CTimerHandler_HPP
